package org.dxy.domain.event.product;

import org.dxy.domain.event.AggregateTypeEnum;
import org.dxy.domain.event.DomainEvent;
import org.dxy.domain.model.valobj.Bom;

import java.time.LocalDateTime;

/**
 * 产品更新事件
 */
public record ProductUpdatedEvent(
        Long productId,
        String productName,
        String type,
        String version,
        String unit,
        Bom bom
) implements DomainEvent {
    

    @Override
    public Long aggregateId() {
        return productId;
    }
    
    @Override
    public String aggregateType() {
        return AggregateTypeEnum.PRODUCT.getKey();
    }
    
    @Override
    public String eventType() {
        return ProductEventTypeEnum.UPDATED.getKey();
    }
}